import {ListBox, TextBox} from './Components';
import {ScrollBarDecorator, BlackBorderedDecorator} from './Decorators';
import separate from '../patternSeparator';
separate('装饰者模式');

let list = new ListBox();
// 给列表框添加滚动条
let listScrollBar = new ScrollBarDecorator(list);
listScrollBar.display();
console.log('----------------');
let text = new TextBox();
// 给文本框添加黑色边框
let textBordered = new BlackBorderedDecorator(text);
textBordered.display();
console.log('----------------');
// 有黑色边框和滚动条的文本框
let box = new TextBox();
let boxScrollBar = new ScrollBarDecorator(box);
let boxScrollBarBordered = new BlackBorderedDecorator(boxScrollBar);
boxScrollBarBordered.display();
